CREATE SEQUENCE elso_s;
SELECT * FROM NIKOVITS.vilag_orszagai;

SELECT ELSO_S.NEXTVAL FROM DUAL;
SELECT ELSO_S.CURRVAL FROM DUAL;
INSERT INTO T1 VALUES (ELSO_S.NEXTVAL);

CREATE DATABASE LINK bubu
CONNECT TO FELHASZNALO_NEV IDENTIFIED BY JELSZO
USING 'ORADB';

select * from user_objects where object_name='BUBU';

SELECT * FROM NIKOVITS.vilag_orszagai;

SELECT F.NEV FROM NIKOVITS.FOLYOK@BUBU F
WHERE upper(F.ORSZAGOK) LIKE '%' ||
(SELECT upper(O.TLD) FROM NIKOVITS.vilag_orszagai O 
WHERE
O.NEV LIKE '%Cseh%') || '%';

select file_name, round(bytes/(1024*1024), 1) from
((select d.file_name, d.bytes from dba_data_files d) 
union
(select t.file_name, t.bytes from dba_temp_files t))
unio order by unio.bytes;

select * from
((select d.file_name, round(d.bytes/(1024*1024),1) mb
from dba_data_files d) 
union
(select t.file_name, round(t.bytes/(1024*1024),1) mb
from dba_temp_files t) order by mb)
where rownum<4 order by 2 desc;

select d.tablespace_name from dba_tablespaces d;

select * from dba_segments where owner='JAGRABI';

SELECT tablespace_name, max(extents) FROM DBA_SEGMENTS
WHERE SEGMENT_TYPE='INDEX' group by tablespace_name;

select d.file_name, sum(d.bytes) from dba_data_files d 
group by d.file_name;
